/** @file MapView.js
@brief The MapView object methods

MapView defines the methods related to the MapView object.

@authorname \n
@licenseversion \n
@actualversion - @dateupdate

@licensenote
*/

/**
    @fn swapMapView()
    @brief Inverts the current map view from street to satellite.

    The different map view modes are changed in sequence depending on
    mapViewModes variable value.
*/
function swapMapView() {
    mapViewModes++;

    if (mapViewModes == 4) { mapViewModes = 1; }

    switch (mapViewModes) {
    case 1:
        map.mapType = Map.StreetMap;
        break;
    case 2:
        map.mapType = Map.SatelliteMapDay;
        break;
    case 3:
        map.mapType = Map.TerrainMap;
        break;
    case 4:
        map.mapType = Map.SatelliteMapNight;
        break;
    }
}

/**
    @fn swapZoom()
    @brief Invert the current zoom level (from max to min and vice-versa).

    This fucntion should be used for one-touch zoom max/min
*/
function swapZoom() {
    if (map.zoomLevel == maxZoom) {
        map.zoomLevel = minZoom;
        return minZoom;
    }
    else {
        map.zoomLevel = maxZoom;
        return maxZoom;
    }
}
